console.log('-------------------')
console.log('test14')

class Collection{
    *[Symbol.iterator](){
        console.log('323232')
        let i=0;
        while(this[i] !== undefined){
            yield this[i]
            ++i;
        }
    }
}

let myCollection = new Collection();
myCollection[0] = 1;
myCollection[1] = 2;
for(let value of myCollection){
    console.log(value)
}
// 323232
// 1
// 2
